package com.jydw.da.frame.controller;

import com.jydw.da.frame.pojo.Role;
import com.jydw.da.frame.service.RoleService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (role)表控制层
 *
 * @author xxxxx
 */
@RestController
@RequestMapping("/role")
public class RoleController {
    /**
     * 服务对象
     */
    @Resource
    private RoleService roleService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public Role selectOne(Integer id) {
        return roleService.getById(id);
    }

}
